// components/grade/grade.js
// 年级选择器
import { selectorMixin } from "../selector";
Component({
  behaviors: [selectorMixin],
  data: {
    grades: ["大一", "大二", "大三", "大四", "研究生", "博士生"],
  },
  methods: {
    onSelectGrade(e) {
      const gradeIdx = e.currentTarget.dataset.grade;
      this.emitSelect({ id: gradeIdx + 1, value: this.data.grades[gradeIdx] });
      this.closeSelector();
    },
  },
});
